package com.share.common.common;

import java.io.Serializable;

public class LoginInfoContext implements Serializable {
    private static ThreadLocal<LoginInfo> loginUserThreadLocal = new ThreadLocal<LoginInfo>();

    public static LoginInfo getSession() {
        return loginUserThreadLocal.get();
    }

    public static void setSession(LoginInfo userinfo) {
        loginUserThreadLocal.set(userinfo);
    }

    public static void removeSession() {
        loginUserThreadLocal.remove();
    }
}
